package com.fire.market.order.service.impl;

import com.fire.component.dto.SingleResponse;
import com.fire.component.extension.Assert;
import com.fire.market.order.api.dto.OrderInfo;
import com.fire.market.order.api.request.OrderCreateParam;
import com.fire.market.order.api.service.OrderCmdFrontService;
import com.fire.market.order.service.OrderCmdCoreService;
import org.apache.dubbo.config.annotation.Service;

import javax.annotation.Resource;

/**
 * OrderCmdFrontServiceImpl
 *
 * @author zwd
 * @date 2021/7/21
 */
@Service
public class OrderCmdFrontServiceImpl implements OrderCmdFrontService {
    @Resource
    OrderCmdCoreService orderCmdCoreService;

    @Override
    public SingleResponse<OrderInfo> createOrder(OrderCreateParam param) {
        Assert.notNull(param, "param is null");
        return SingleResponse.of(orderCmdCoreService.createOrder(param));
    }
}
